#coding=utf-8

import traceback

l0 = range(10)
l1 = iter(l0)

for i in l1:
    print(i)

print(l1)
print(type(l1))
# print(list(l1))
# while True:
#     try:
#         l1.next()
#     except StopIteration as e:
#         traceback.print_exc(e)
#         break
#     print('done')


d0 = {'a': 'aa', 'b': 'bb'}
d1 = d0.iteritems()
print(d1)
print(d1.next())